package cn.sptpc.Controller;

import cn.sptpc.service.ActivityService;
import cn.sptpc.service.impl.ActivityServiceI;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/down.do")
public class DownloadServlet extends HttpServlet {
    private ActivityService activityService = new ActivityServiceI();
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String tran = request.getParameter("tran");
        if ("word".equals(tran)){
            String id = request.getParameter("id");
            activityService.getImg(request,response);
        }
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doPost(request, response);
    }
}
